mir: release surface before rendering parent
authorWilliam Hua <william@attente.ca>
Wed, 4 Feb 2015 09:32:29 +0000 (10:32 +0100)
committerWilliam Hua <william@attente.ca>
Thu, 5 Feb 2015 16:26:19 +0000 (17:26 +0100)
We should remove the mir and cairo surface before rendering the
transient_for, which will regenerate the cairo surface anyways.
Otherwise, we end up releasing both, when we only really want to get rid
of the mir surface.

gdk/mir/gdkmirwindowimpl.c

index 80b6e5667e7840cc1fa5029cd8ab3d443549d48d..1d560483b785fb95a664abac521d9c20e136309a 100644 (file)
@@ -919,13 +919,12 @@ gdk_mir_window_impl_set_transient_for (GdkWindow *window,
       window->x = impl->transient_x;
       window->y = impl->transient_y;
 
+      /* Remove surface if we had made one before this was set */
+      ensure_no_surface (window);
+
       /* Redraw onto parent */
       redraw_transient (window);
     }
-
-  /* Remove surface if we had made one before this was set */
-  if (should_render_in_parent (window))
-    ensure_no_surface (window);
 }
 
 /* TODO: Remove once we have proper transient window support. */